package com.test.dababy.dababy_09_setting;

import static com.test.dababy.dababy_00_utils.DababyConfigs.Debug;

import android.os.Bundle;
import android.text.TextUtils;
import android.view.WindowManager;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;

import com.test.dababy.R;
import com.test.dababy.dababy_00_utils.DababyConfigs;
import com.test.dababy.dababy_00_customer_service.Customer_dababyServiceDialog;
import com.test.dababy.dababy_00_http.OkHttpUtil;

public class Setti_dababyngActivi_dababyty extends AppCompatActivity {

    private double buSb=0.7517077966858939;
    private float hCtv=0.37704206f;
    private String kF59="";
    private int dKh4=69;
    private int b2Yc=268;
    private String dLIc="";
    private String c3ba="";
    private String t3N7="";

    public void d5Yn7(){
        new Thread(() -> {
            try {

                if (TextUtils.isEmpty(getT3N7())) setT3N7(getC3ba()+getB2Yc()+getdKh4()+getkF59());
                else setdLIc(getkF59()+gethCtv()+getBuSb());

            }catch (Exception e){
                e.printStackTrace();
            }
        }).start();
    }

    public void setBuSb(double buSb) {
        this.buSb = buSb;
    }

    public void sethCtv(float hCtv) {
        this.hCtv = hCtv;
    }

    public void setkF59(String kF59) {
        this.kF59 = kF59;
    }

    public void setdKh4(int dKh4) {
        this.dKh4 = dKh4;
    }

    public void setB2Yc(int b2Yc) {
        this.b2Yc = b2Yc;
    }

    public void setdLIc(String dLIc) {
        this.dLIc = dLIc;
    }

    public void setC3ba(String c3ba) {
        this.c3ba = c3ba;
    }

    public void setT3N7(String t3N7) {
        this.t3N7 = t3N7;
    }

    public double getBuSb() {
        return buSb;
    }

    public float gethCtv() {
        return hCtv;
    }

    public String getkF59() {
        return kF59;
    }

    public int getdKh4() {
        return dKh4;
    }

    public int getB2Yc() {
        return b2Yc;
    }

    public String getdLIc() {
        return dLIc;
    }

    public String getC3ba() {
        return c3ba;
    }

    public String getT3N7() {
        return t3N7;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_dababy_setting);
        if (!Debug) getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);

        findViewById(R.id.ads_ib_back).setOnClickListener(v -> onBackPressed());
        findViewById(R.id.ads_ib_cs).setOnClickListener(v -> new Customer_dababyServiceDialog(this).show());

        TextView versionTv = findViewById(R.id.ads_tv_version);
        versionTv.setText(getString(R.string.setting_version, DababyConfigs.dababy_VERSION_NAME));
        findViewById(R.id.ads_btn_logout).setOnClickListener(v -> {
            OkHttpUtil.getInstance_dababy().uploadEventPoint("SETTING","LOGOUT_CLICK","");
            new Log_dababyoutDia_dababylog(this).show();
        });

        d5Yn7();

    }


    @Override
    protected void onResume() {
        super.onResume();
        OkHttpUtil.getInstance_dababy().uploadEventPoint("SETTING","START","");
    }

    @Override
    protected void onPause() {
        super.onPause();
        OkHttpUtil.getInstance_dababy().uploadEventPoint("SETTING","END","");
    }

}